#include "Light.h"

//---------------------------------------------------------------------------------------------//
Light::Light()
{
   ZeroMemory( &m_light, sizeof(D3DLIGHT9) );
   m_light.Diffuse.r  = 1.0f;
   m_light.Diffuse.g  = 1.0f;
   m_light.Diffuse.b  = 1.0f;
   m_light.Diffuse.a  = 1.0f;

   m_light.Range = 1000.0f;
}
//---------------------------------------------------------------------------------------------//
bool Light::setLight(Renderer* renderer)
{
   return renderer->setLights(&m_light);
}
//---------------------------------------------------------------------------------------------//
void Light::setColor(float R, float G, float B, float diffuse)
{
   m_light.Diffuse.r  = R;
   m_light.Diffuse.g  = G;
   m_light.Diffuse.b  = B;
   m_light.Diffuse.a  = diffuse;
}
//---------------------------------------------------------------------------------------------//
void Light::setRange(float range)
{
   m_light.Range = range;
}